//
//  AuthorityTools.swift
//  小微贷
//
//  Created by slience on 2019/5/23.
//  Copyright © 2019年 sanwenqian. All rights reserved.
//

import UIKit
import AVFoundation
import Contacts
import Photos

class AuthorityTools: NSObject {

    //MARK: 相机权限
   static func cameraAuthority(complete : ((Bool)->())){
        
        let captureStatus  = AVCaptureDevice.authorizationStatus(for: .video)
        
        switch captureStatus {
        case .authorized://批准
            complete(true)
        case .notDetermined://用户从未对象授权做操作
            complete(false)
        case .denied://用户禁止
            complete(false)
        default: // 受限制的
            complete(false)

        }
    }
    
   
    
    
}
